package com.meshnetics.gb.type;

/**
 * Regestry for all known types. Any entity should obtain type by name or data type id using this registry.
 *
 * @author AKovylin
 */
public interface TypesRegistry {
    /**
     * Returns type by name or null if no such type exist.
     *
     * @param name name of type
     * @return type or null if no such type exist
     */
    DataType getType(String name);

    /**
     * Returns type by data type id or null if no such type exist.
     *
     * @param dataTypeID data type id of type
     * @return type or null if no such type exist
     */
    DataType getType(byte dataTypeID);
}
